<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<%@ include file="/WEB-INF/jsp/admin/inc/taglibs.jsp"%>
	<%@ include file="/WEB-INF/jsp/admin/inc/meta.jsp"%>
</head>  
  <body style="background:#E8F5FE; padding:15px 18px;" class="scroll_r">
<div id="right_w"><p>当前位置：系统管理 >>商品管理</p></div>

<form method="post" action="${approot}/admin/${entity}/list/form/0/0" id="bean">
<table border="0" cellpadding="0" cellspacing="1" width="98%" align="center" id="add_tab">
<tr>
<th>货号</th>
<td><input type="text" name="goodsSn" value="${bean.goodsSn}"/></td>
<th>品名</th>
<td><input type="text" name="name" value="${bean.name}"/></td>
<th>上架：</th>
<td>
 <select name="isOnSale">
                            <option value="-1">全部</option>
                            <option value="1">已上架</option>
                            <option value="0">未上架</option>
                            </select>
</td>
<th>开始时间：</th>
<td> <input type="text" id="startTime" name="startTime"  value="${bean.startTimeOneString}" class="Wdate" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}',startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"/> </td>
<th>截止时间：</th>
<td> <input type="text" id="endTime" name="endTime" value="${bean.endTimeOneString}" class="Wdate" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"/> </td>
</tr>
<tr>
<td colspan="10" style="text-align: center">
<input type="submit" class="but" value="开始查询">
<input type="button" class="but" onclick="formreset();" value="重置条件">
</td>
</tr>
</table>
</form> 


<table border="0" cellpadding="" cellspacing="1" align="center" width="98%" id="web_tab">
<caption style="text-align: right;margin-bottom:4px;">
<button class="but" onclick="location.href='${approot}/admin/${entity}/toAdd'">添加商品</button>
<button class="but" onclick="return delete_batch('${entity}','${approot}/admin/${entity}/list/menu/0/0')">批量删除</button>
</caption>
 <tr>
  <th width="4%"><input type="checkbox" name="all" value="all" onclick="select_all(this.checked)"/> </th>
  <th width="6%">编号</th>
  <th >商品名称</th>
  <th width="8%">货号</th>
  <th width="6%">价格</th>
  <th width="6%">库存</th>
  <th width="6%">上架</th>
  <th width="6%">新品</th>
  <th width="6%">精品</th>
  <th width="6%">热销</th>
  <th width="6%">促销</th>
  <th width="12%">创建时间</th>
  <th width="12%">操作</th>
 </tr>
<c:forEach var="item" items="${page.items}">
 <tr>
  <td><input type="checkbox" name="ids" value="${item.id}"/></td>
  <td>${item.id}</td>
  <td>${item.name}</td>
  <td>${item.goodsSn}</td>
  <td>${item.shopPrice}</td>
  <td>${item.goodsNumber}</td>
  <td>
  <c:choose>
  <c:when test="${item.isOnSale=='1'}"> <img src="${approot}/resource/images/common/yes.gif"/> </c:when>
  <c:otherwise><img src="${approot}/resource/images/common/no.gif"/></c:otherwise>
  </c:choose>
  </td>
  <td>
  <c:choose>
  <c:when test="${item.isNew=='1'}"> <img src="${approot}/resource/images/common/yes.gif"/> </c:when>
  <c:otherwise><img src="${approot}/resource/images/common/no.gif"/></c:otherwise>
  </c:choose>
  </td>
  <td>
  <c:choose>
  <c:when test="${item.isBest=='1'}"> <img src="${approot}/resource/images/common/yes.gif"/> </c:when>
  <c:otherwise><img src="${approot}/resource/images/common/no.gif"/></c:otherwise>
  </c:choose>
  </td>
  <td>
  <c:choose>
  <c:when test="${item.isHot=='1'}"> <img src="${approot}/resource/images/common/yes.gif"/> </c:when>
  <c:otherwise><img src="${approot}/resource/images/common/no.gif"/></c:otherwise>
  </c:choose>
  </td>
  <td>
  <c:choose>
  <c:when test="${isPromote=='1'}"> <img src="${approot}/resource/images/common/yes.gif"/> </c:when>
  <c:otherwise><img src="${approot}/resource/images/common/no.gif"/></c:otherwise>
  </c:choose>
  </td>
  <td><fmt:formatDate value="${item.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
  <td>
  <a href="#" onclick="return delete_item('${entity}','${item.id}','${approot}/admin/${entity}/list/menu/0/0')">删除</a>
  <a href="${approot}/admin/${entity}/toEdit/${item.id}">修改</a>
   </td>
 </tr>
 </c:forEach>
</table>
<%@ include file="/WEB-INF/jsp/admin/inc/page.jsp"%>  
</body>
</html>
